package com.itstherules.jmsunit.expectation;

import com.itstherules.jmsunit.expectation.JmsExpectation;
import com.itstherules.jmsunit.expectation.JmsMessageAndStringExpectation;
import com.itstherules.jmsunit.expectation.xml.comparison.XmlIdenticalExpectation;
import com.itstherules.jmsunit.expectation.xml.xpath.SoapXPathDoesntExistExpectation;
import com.itstherules.jmsunit.expectation.xml.xpath.SoapXPathEqualsExpectation;
import com.itstherules.jmsunit.expectation.xml.xpath.XPathDoesntExistExpectation;
import com.itstherules.jmsunit.expectation.xml.xpath.XPathEqualsExpectation;

public final class XmlBasedExpectations {

	public static JmsExpectation xmlEq(String expected) {
		return new JmsMessageAndStringExpectation(new XmlIdenticalExpectation(expected));
	}

	public static JmsExpectation xPathEq(String expected, String xPath) {
		return new JmsMessageAndStringExpectation(new XPathEqualsExpectation(expected, xPath));
	}

	public static JmsExpectation xPathDoesntExist(String xPath) {
		return new JmsMessageAndStringExpectation(new XPathDoesntExistExpectation(xPath));
	}

	public static JmsExpectation soapBodyXPathEq(String expected, String xPath) {
		return new JmsMessageAndStringExpectation(new SoapXPathEqualsExpectation(expected, xPath));
	}

	public static JmsExpectation soapBodyXPathDoesntExist(String xPath) {
		return new JmsMessageAndStringExpectation(new SoapXPathDoesntExistExpectation(xPath));
	}
}
